using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ent.Web.CSH;

public partial class Help : System.Web.UI.Page
{
    public Help()
    {
        this.PreRender += new EventHandler(Help_PreRender);
    }

    void Help_PreRender(object sender, EventArgs e)
    {
         lblSummary.Text = ResourceHelper.Get("LBL_Summary");
         lblOtherLinks.Text = ResourceHelper.Get("LBL_OtherRelatedLinks");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"];
        if (id != "")
        {
            string Language = Session["LANG"] == null ? "en-US" : Session["LANG"].ToString();
            HelpDocument hd = new HelpDocument(Language, Server.MapPath("~"));
            lblSummaryText.Text = hd.GetSummary(id);
            lblDetails.Text = hd.GetDetail(id);
            string[] links = hd.GetLinks(id);
            if (links != null)
            {
                for (int i = 0; i < links.Length; i++)
                {
                    lblOtherLinksText.Text += "<a href='Help.aspx?id=" + links.GetValue(i).ToString() + "'>" + links.GetValue(i).ToString() + "</a>";
                }
            }
            else
                lblOtherLinks.Visible = false;
        }
    }
}
